#pragma once

#include "Event.h"
#include "Widget.h" 
#include "Window.h"

namespace My {

class ScrollBar : 
	public Window<CScrollBar>,
	public Widget, 
	public EventDispatcher
{
private:
	SCROLLINFO	m_Info;
public:
	ScrollBar();
public:
	void SetInfo(SCROLLINFO & info);
public:
	virtual CRect Bounds() const
		{ return Widget::Bounds(); }
	virtual bool Visible() const
		{ return Widget::Visible(); }
	virtual const CFont * Font() const
		{ return Widget::Font(); }
protected:
	virtual void DoCreateWindow();
public:
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar * pScrollBar);
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar * pScrollBar);
	DECLARE_MESSAGE_MAP()
};

} // My
